package com.job.shuang.HomeWork0709;

/**
 * @author Liushuang
 * @version 1.0
 * @since 2022-07-09 20:56:07
 */
public class YangHuiTriangle {
    public static void main(String[] args) {
        int a,b,c=5,len,i;
        int arr[]=new int[6];
        System.out.println(1);
        for (a=1;a<=c;a++){
            len=1;
            System.out.print(1+" ");
            for (b = 1; b <=a ; b++) {
                i=arr[b];
                arr[b]=len+i;//求上面两个数字之和
                len=i;
                System.out.print(arr[b]+" ");
            }
            System.out.println();
        }
    }
}